﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using efuture.http;
using System.Xml.XPath;
using System.IO;
using System.Reflection;
using System.Linq;
using efuture.utils;
using efuture.xml;

namespace efuture.vdrp
{
    public partial class frmFilter : DevExpress.XtraEditors.XtraForm
    {
        public String ReportId = String.Empty, DataModel = String.Empty, FilterString = String.Empty;

        static String EDT = "edt", LAB = "lab";
        static String TLP = "TLP_" + VdrpUtils.getIdentity();

        public frmFilter()
        {
            InitializeComponent();
        }

        private void loadData(String id)
        {
            edtCriteriaMode.SelectedIndex = -1;
            edtCriteria.SelectedIndex = -1;
            edtCriteria.Properties.Items.Clear();

            int SelectedIndex = 0;

            String Contents = HttpHelper.DoGet(String.Format("/report/custom/grid/criteria/find?ReportId={0}", ReportId), null);

            XPathNavigator _xNav = XMLHelper.CreateNavigator(Contents);
            XPathNodeIterator nodes = null;
            nodes = _xNav.Select("/Root/GridCriteria");
            if (nodes.Count > 0)
            {
                foreach (XPathNavigator node in nodes)
                {
                    String label = node.SelectSingleNode("CriteriaName").Value;
                    String value = node.SelectSingleNode("CriteriaType").Value;
                    String[] arr = value.Split(',');

                    edtCriteria.Properties.Items.Add(new ImageComboBoxItem(label, value));

                    if (id.Equals(arr[1]))
                    {
                        SelectedIndex = edtCriteria.Properties.Items.Count - 1;
                    }
                }

                edtCriteria.SelectedIndex = SelectedIndex;
            }
        }

        private void frmFilter_Shown(object sender, EventArgs e)
        {
            FilterString = String.Empty;
            if (this.edtCriteria.SelectedItem == null)
            {
                loadData(ReportId);
            }
        }

        private void Condition_EditValueChanged(object sender, EventArgs e)
        {

        }

        private void Condition_Enter(object sender, EventArgs e)
        {
            String DataType = Convert.ToString(((BaseEdit)sender).Tag);

            if (Constants.DataType.CODE.Equals(DataType))
            {
                CheckedComboBoxEdit be = (CheckedComboBoxEdit)sender;
                if (be.Properties.DataSource == null)
                {
                    String name = be.Name.Substring(3, be.Name.LastIndexOf('_') - 3);
                    be.Properties.ValueMember = "Value";
                    be.Properties.DisplayMember = "Label";
                    be.Properties.ExportMode = DevExpress.XtraEditors.Repository.ExportMode.Value;

                    String xmlData = HttpHelper.DoGet(String.Format("/report/custom/mdm/list?name={0}", name), null);
                    DataSet ds = new DataSet();
                    ds.ReadXmlSchema(Application.StartupPath + "\\LabelValue.xsd");
                    ds.ReadXml(new StringReader(xmlData));

                    be.Properties.DataSource = ds.Tables[0];
                }
            }
        }

        private void Op_SelectedIndexChanged(object sender, EventArgs e)
        {
            TableLayoutPanel tlp = ((TableLayoutPanel)panelControl3.Controls.Find(TLP, false)[0]);
            ImageComboBoxEdit be = (ImageComboBoxEdit)sender;

            String op = be.EditValue.ToString();
            String n = be.Name + "_" + op;

            foreach (Object i in be.Properties.Items)
            {
                ImageComboBoxItem icb = (ImageComboBoxItem)i;

                (tlp.Controls.Find(be.Name + "_" + icb.Value, true)[0]).Visible = false;
                if (Constants.Condition.BETWEEN.Equals(icb.Value))
                {
                    (tlp.Controls.Find(be.Name + "_" + icb.Value + "2", true)[0]).Visible = false;
                }
            }

            (tlp.Controls.Find(n, true)[0]).Visible = true;
            if (Constants.Condition.BETWEEN.Equals(op))
            {
                (tlp.Controls.Find(n + "2", true)[0]).Visible = true;
            }

        }

        private void edtCriteria_SelectedIndexChanged(object sender, EventArgs e)
        {
            int i = 0;
            edtCriteriaMode.SelectedIndex = -1;
            this.panelControl3.Controls.Clear();

            TableLayoutPanel tlp = new TableLayoutPanel();
            tlp.Name = TLP;
            tlp.Parent = this.panelControl3;
            tlp.Dock = DockStyle.Fill;

            if (edtCriteria.SelectedIndex == -1)
            {
                return;
            }

            ImageComboBoxItem item = (ImageComboBoxItem)edtCriteria.SelectedItem;
            //MessageBox.Show(item.Value.ToString());
            String[] arr = item.Value.ToString().Split(',');
            String CriteriaId = arr[1], CriteriaMode = arr[0];

            String Contents = HttpHelper.DoGet(String.Format("/report/custom/grid/criteria/find?Id={0}", CriteriaId), null);
            XPathNavigator xNav = XMLHelper.CreateNavigator(Contents);
            XPathNodeIterator nodes = null;

            tlp.ColumnCount = 5;
            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 127F));
            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 106F));
            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 206F));
            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 206F));
            tlp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());

            Contents = xNav.SelectSingleNode(String.Format("/Root/GridCriteria[Id='{0}']/Contents", CriteriaId)).Value;
            xNav = XMLHelper.CreateNavigator(Contents);
            nodes = xNav.Select("/Root/Field");
            tlp.RowCount = nodes.Count + 1;
            for (i = 0; i < nodes.Count; i++)
            {
                tlp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F));
            }
            tlp.RowStyles.Add(new System.Windows.Forms.RowStyle());


            i = 0;
            foreach (XPathNavigator node in nodes)
            {
                String Caption = node.SelectSingleNode("Caption").Value;
                String Name = node.SelectSingleNode("Name").Value;
                String Op = node.SelectSingleNode("Op").Value;
                String Ops = node.SelectSingleNode("Ops").Value;
                String DataType = node.SelectSingleNode("DataType").Value;
                String Value1 = node.SelectSingleNode("Value1").Value;
                String Value2 = node.SelectSingleNode("Value2").Value;

                String[] OpsArr = Ops.Split(',');
                ImageComboBoxItem Op_item = null;

                TextEdit te1 = null, te2 = null;
                for (int j = 0; j < tlp.ColumnCount; j++)
                {
                    PanelControl pnl = new PanelControl();
                    pnl.Location = new Point(2, 0);
                    pnl.Margin = new System.Windows.Forms.Padding(0);
                    pnl.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
                    tlp.Controls.Add(pnl, j, i);
                    pnl.Dock = DockStyle.Fill;


                    if (j == 0)
                    {
                        LabelControl lab = new LabelControl();
                        lab.Parent = pnl;
                        lab.AutoEllipsis = true;
                        lab.AutoSizeMode = LabelAutoSizeMode.None;
                        lab.Size = new Size(121, 23);
                        lab.Location = new Point(2, 2);
                        lab.Name = LAB + Name;
                        lab.Text = Caption;
                        lab.Tag = DataType;
                    }
                    else if (j == 1)
                    {
                        ConditionSymbol_zhCN cs = new ConditionSymbol_zhCN();

                        ImageComboBoxEdit be = new ImageComboBoxEdit();
                        be.Parent = pnl;
                        be.Size = new Size(100, 23);
                        be.Location = new Point(2, 2);
                        be.Name = EDT + Name;
                        be.SelectedIndexChanged += this.Op_SelectedIndexChanged;

                        Type t = typeof(ConditionSymbol_zhCN);
                        foreach (String op in OpsArr)
                        {
                            String label = (string)t.InvokeMember("_" + op, BindingFlags.GetProperty, null, cs, null);
                            ImageComboBoxItem iitem = new ImageComboBoxItem(label, op);
                            be.Properties.Items.Add(iitem);
                            if (op.Equals(Op))
                            {
                                Op_item = iitem;
                            }
                        }
                        be.Tag = Ops;
                    }
                    else if (j == 2)
                    {
                        BaseEdit be1 = null, be2 = null;

                        if (Constants.DataType.CODE.Equals(DataType))
                        {
                            foreach (String op in OpsArr)
                            {
                                if (Constants.Condition.IN.Equals(op))
                                {
                                    be1 = new CheckedComboBoxEdit();
                                }
                                else
                                {
                                    be1 = new TextEdit();
                                }
                                be1.Name = EDT + Name + "_" + op;
                                be1.Parent = pnl;
                                be1.Size = new Size(200, 23);
                                be1.Location = new Point(2, 2);
                                be1.Tag = DataType;
                                be1.Enter += Condition_Enter;
                                be1.EditValueChanged += Condition_EditValueChanged;
                            }
                        }
                        else if (Constants.DataType.DATE.Equals(DataType))
                        {
                            foreach (String op in OpsArr)
                            {
                                be1 = new DateEdit();
                                be1.Name = EDT + Name + "_" + op;
                                be1.Parent = pnl;
                                be1.Size = new Size(98, 23);
                                be1.Location = new Point(2, 2);
                                be1.EditValue = null;
                                be1.Tag = DataType;
                                ((DateEdit)be1).Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
                                ((DateEdit)be1).Properties.DisplayFormat.FormatString = "yyyy-MM-dd";
                                ((DateEdit)be1).Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
                                ((DateEdit)be1).Properties.EditFormat.FormatString = "yyyy-MM-dd";
                                be1.Enter += Condition_Enter;
                                be1.EditValueChanged += Condition_EditValueChanged;


                                if (Constants.Condition.BETWEEN.Equals(op))
                                {
                                    be2 = new DateEdit();
                                    be2.Name = EDT + Name + "_" + Constants.Condition.BETWEEN2;
                                    be2.Parent = pnl;
                                    be2.Size = new Size(98, 23);
                                    be2.Location = new Point(be1.Width + 6, be1.Location.Y);
                                    be2.Visible = false;
                                    be2.EditValue = null;
                                    be2.Tag = DataType;
                                    ((DateEdit)be2).Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
                                    ((DateEdit)be2).Properties.DisplayFormat.FormatString = "yyyy-MM-dd";
                                    ((DateEdit)be2).Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
                                    ((DateEdit)be2).Properties.EditFormat.FormatString = "yyyy-MM-dd";
                                    be2.Enter += Condition_Enter;
                                    be2.EditValueChanged += Condition_EditValueChanged;
                                }
                            }
                        }
                        else if (Constants.DataType.DECIMAL.Equals(DataType))
                        {
                            foreach (String op in OpsArr)
                            {
                                be1 = new SpinEdit();
                                be1.Name = EDT + Name + "_" + op;
                                ((SpinEdit)be1).Properties.Buttons.Clear();
                                be1.Parent = pnl;
                                be1.Size = new Size(98, 23);
                                be1.Location = new Point(2, 2);
                                be1.EditValue = null;
                                be1.Tag = DataType;
                                be1.Enter += Condition_Enter;
                                be1.EditValueChanged += Condition_EditValueChanged;

                                if (Constants.Condition.BETWEEN.Equals(op))
                                {
                                    be2 = new SpinEdit();
                                    be2.Name = EDT + Name + "_" + Constants.Condition.BETWEEN2;
                                    ((SpinEdit)be2).Properties.Buttons.Clear();
                                    be2.Parent = pnl;
                                    be2.Size = new Size(98, 23);
                                    be2.Location = new Point(be1.Width + 6, be1.Location.Y);
                                    be2.Visible = false;
                                    be2.EditValue = null;
                                    be2.Tag = DataType;
                                    be2.Enter += Condition_Enter;
                                    be2.EditValueChanged += Condition_EditValueChanged;
                                }
                            }
                        }
                        else
                        {
                            foreach (String op in OpsArr)
                            {
                                be1 = new TextEdit();
                                be1.Name = EDT + Name + "_" + op;
                                be1.Parent = pnl;
                                be1.Size = new Size(200, 23);
                                be1.Location = new Point(2, 2);
                                be1.Tag = DataType;
                                be1.Enter += Condition_Enter;
                                be1.EditValueChanged += Condition_EditValueChanged;
                            }
                        }

                        ((ImageComboBoxEdit)(tlp.Controls.Find(EDT + Name, true)[0])).SelectedItem = Op_item;
                    }
                    else if (j == 3)
                    {
                        if (OpsArr.Contains(Constants.Condition.BETWEEN))
                        {
                            te1 = new TextEdit();
                            te1.Name = EDT + Name + "_v1";
                            te1.Parent = pnl;
                            te1.Size = new Size(98, 23);
                            te1.Location = new Point(2, 2);

                            te2 = new TextEdit();
                            te2.Name = EDT + Name + "_v2";
                            te2.Parent = pnl;
                            te2.Size = new Size(98, 23);
                            te2.Location = new Point(te1.Width + 6, te1.Location.Y);
                        }
                        else
                        {
                            te1 = new TextEdit();
                            te1.Name = EDT + Name + "_v1";
                            te1.Parent = pnl;
                            te1.Size = new Size(200, 23);
                            te1.Location = new Point(2, 2);
                        }
                    }
                }
                i++;

                if (!string.IsNullOrEmpty(Value1) && te1 != null)
                {
                    te1.EditValue = Value1;
                }
                if (!string.IsNullOrEmpty(Value2) && te2 != null)
                {
                    te2.EditValue = Value2;
                }
            }

            edtCriteriaMode.SelectedIndex = edtCriteriaMode.Properties.Items.GetItemIndexByValue(CriteriaMode);
        }

        private void edtCriteriaMode_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (edtCriteriaMode.SelectedIndex == -1)
            {
                return;
            }
            TableLayoutPanel tlp = ((TableLayoutPanel)panelControl3.Controls.Find(TLP, false)[0]);
            tlp.ColumnStyles[3].Width = edtCriteriaMode.SelectedIndex == 0 ? 0 : 206F;
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            ImageComboBoxItem item = (ImageComboBoxItem)edtCriteria.SelectedItem;
            if (item == null)
            {
                return;
            }

            String Name = item.Description;
            String id = item.Value.ToString().Split(',')[1];
            String xmlData = getCriteria(id, Name);

            HttpHelper.DoPost("/report/custom/grid/criteria/update", xmlData, null);

        }

        private void btnSaveTo_Click(object sender, EventArgs e)
        {
            ImageComboBoxItem item = (ImageComboBoxItem)edtCriteria.SelectedItem;
            if (item == null)
            {
                return;
            }

            String Name = InputBox.ShowInputBox("方案名", "");
            if (String.IsNullOrEmpty(Name))
            {
                return;
            }
            String Id = VdrpUtils.getIdentity();
            String xmlData = getCriteria(Id, Name);

            HttpHelper.DoPost("/report/custom/grid/criteria/add", xmlData, null);

            loadData(Id);
        }

        private String getCriteria(String Id, String Name)
        {
            TableLayoutPanel tlp = ((TableLayoutPanel)panelControl3.Controls.Find(TLP, false)[0]);

            StringBuilder sb = new StringBuilder();
            sb.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
            sb.Append("<Root>");
            sb.Append("<GridCriteria>");
            sb.Append(String.Format("<Id>{0}</Id>", Id));
            sb.Append(String.Format("<CriteriaName>{0}</CriteriaName>", Name));
            sb.Append(String.Format("<CriteriaType>{0},{1}</CriteriaType>", edtCriteriaMode.EditValue, Id));
            sb.Append(String.Format("<ReportId>{0}</ReportId>", ReportId));
            sb.Append(String.Format("<UserId>{0}</UserId>", "0"));
            sb.Append("<Contents><![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>");

            foreach (Control pnl in tlp.Controls)
            {
                if (pnl.HasChildren)
                {
                    foreach (Control c in pnl.Controls)
                    {
                        if (c.GetType() == typeof(ImageComboBoxEdit) && c.Name.StartsWith("edt"))
                        {
                            String field = c.Name.Substring(3);

                            ImageComboBoxEdit be = (ImageComboBoxEdit)c;
                            LabelControl lab = (LabelControl)(panelControl3.Controls.Find(LAB + field, true)[0]);

                            BaseEdit be1 = null, be2 = null;
                            be1 = (BaseEdit)(panelControl3.Controls.Find(EDT + field + "_v1", true)[0]);
                            if (Constants.Condition.BETWEEN.Equals(be.EditValue))
                            {
                                be2 = (BaseEdit)(panelControl3.Controls.Find(EDT + field + "_v2", true)[0]);
                            }

                            sb.Append("<Field>");
                            sb.Append(String.Format("<Name>{0}</Name>", c.Name.Substring(3)));
                            sb.Append(String.Format("<Caption>{0}</Caption>", lab.Text));
                            sb.Append(String.Format("<DataType>{0}</DataType>", lab.Tag));
                            sb.Append(String.Format("<Op>{0}</Op>", be.EditValue));
                            sb.Append(String.Format("<Ops>{0}</Ops>", be.Tag));
                            sb.Append(String.Format("<Value1>{0}</Value1>", be1.EditValue));
                            sb.Append(String.Format("<Value2>{0}</Value2>", be2 == null ? "" : be2.EditValue));
                            sb.Append("</Field>");
                        }
                    }
                }
            }
            sb.Append("</Root>]]></Contents>");
            sb.Append("</GridCriteria>");
            sb.Append("</Root>");
            File.WriteAllText("c:/Criteria.xml", sb.ToString());

            return sb.ToString();
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            this.FilterString = GetFilterString();
            //MessageBox.Show(this.FilterString);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private String GetFilterString()
        {
            String fs = "<Condition><Field>{0}</Field><Op><![CDATA[{1}]]></Op><Value><![CDATA[{2}]]></Value></Condition>";
            TableLayoutPanel tlp = ((TableLayoutPanel)panelControl3.Controls.Find(TLP, false)[0]);

            StringBuilder sb = new StringBuilder();
            sb.Append("<Root>");
            sb.Append("<ReportInfo>");
            sb.Append("<DataModel>").Append(DataModel).Append("</DataModel>");
            sb.Append("<Conditions>");
            foreach (Control pnl in tlp.Controls)
            {
                if (pnl.HasChildren)
                {
                    foreach (Control c in pnl.Controls)
                    {
                        if (c.GetType() == typeof(ImageComboBoxEdit) && c.Name.StartsWith("edt"))
                        {
                            ImageComboBoxEdit be = (ImageComboBoxEdit)c;
                            String field = be.Name.Substring(3);
                            String Op = be.EditValue.ToString();

                            LabelControl lab = (LabelControl)(panelControl3.Controls.Find(LAB + field, true)[0]);

                            BaseEdit be1 = null, be2 = null;
                            be1 = (BaseEdit)(panelControl3.Controls.Find(EDT + field + "_" + Op, true)[0]);
                            if (Constants.Condition.BETWEEN.Equals(Op))
                            {
                                be2 = (BaseEdit)(panelControl3.Controls.Find(EDT + field + "_" + Op + "2", true)[0]);
                            }
                            String DataType = be1.Tag.ToString();

                            TextEdit te1 = null, te2 = null;
                            te1 = (TextEdit)(panelControl3.Controls.Find(EDT + field + "_v1", true)[0]);
                            if (Constants.Condition.BETWEEN.Equals(be.EditValue))
                            {
                                te2 = (TextEdit)(panelControl3.Controls.Find(EDT + field + "_v2", true)[0]);
                            }

                            Object v = null;
                            if (Constants.Condition.BETWEEN.Equals(be.EditValue))
                            {
                                v = be1.EditValue;
                                if (v == null || String.IsNullOrEmpty(v.ToString()))
                                {
                                    v = te1.EditValue;
                                }
                                if (v != null && !String.IsNullOrEmpty(v.ToString()))
                                {
                                    String s1 = GetSymbol(Constants.Condition.GTEQ), s2 = GetFormatData(DataType, v);
                                    sb.Append(String.Format(fs, field, s1, s2));
                                }

                                v = be2.EditValue;
                                if (v == null || String.IsNullOrEmpty(v.ToString()))
                                {
                                    v = te2.EditValue;
                                }
                                if (v != null && !String.IsNullOrEmpty(v.ToString()))
                                {
                                    String s1 = GetSymbol(Constants.Condition.LTEQ), s2 = GetFormatData(DataType, v);
                                    sb.Append(String.Format(fs, field, s1, s2));
                                }
                            }
                            else
                            {
                                v = be1.EditValue;
                                if (v == null || String.IsNullOrEmpty(v.ToString()))
                                {
                                    v = te1.EditValue;
                                }
                                if (v != null && !String.IsNullOrEmpty(v.ToString()))
                                {
                                    String s1 = GetSymbol(Op), s2 = GetFormatData(DataType, v);
                                    sb.Append(String.Format(fs, field, s1, s2));
                                }
                            }
                        }
                    }
                }
            }
            sb.Append("</Conditions>");
            sb.Append("</ReportInfo>");
            sb.Append("</Root>");

            return sb.ToString();
        }

        private String GetSymbol(String Op)
        {
            String s = "=";
            switch (Op)
            {
                case Constants.Condition.EQ: s = "="; break;
                case Constants.Condition.GT: s = ">"; break;
                case Constants.Condition.GTEQ: s = ">="; break;
                case Constants.Condition.IN: s = "IN"; break;
                case Constants.Condition.LIKE: s = "like"; break;
                case Constants.Condition.LT: s = "<"; break;
                case Constants.Condition.LTEQ: s = "<="; break;
                case Constants.Condition.NOTEQ: s = "<>"; break;
                default: s = "="; break;
            }
            return s;
        }

        private String GetFormatData(String DataType, Object v)
        {
            String s = "";
            switch (DataType)
            {
                case Constants.DataType.DATE:
                    if (v.GetType() == typeof(DateTime))
                    {
                        s = "DATE'" + ((DateTime)v).ToString("yyyy-MM-dd") + "'";
                    }
                    else
                    {
                        s = v.ToString();
                    }
                    break;
                case Constants.DataType.DECIMAL: 
                    s = v.ToString(); 
                    break;
                case Constants.DataType.CODE:
                    s = v.ToString();
                    s = s.Replace(" ", "");
                    s = "('" + s.Replace(",", "','") + "')"; 
                    break;
                case Constants.DataType.STRING:
                    s = "'" + v.ToString().Replace("'", "''") + "'";
                    break;
                default: s = "'" + v.ToString().Replace("'", "''") + "'"; 
                    break;
            }
            return s;
        }

    }

    public class Constants
    {

        public class Condition
        {
            public const String EQ = "eq", LT = "lt", LTEQ = "lteq", GT = "gt", GTEQ = "gteq", NOTEQ = "noteq";
            public const String LIKE = "like", IN = "in", BETWEEN = "between", BETWEEN2 = "between2";

        }

        public class DataType
        {
            public const String CODE = "code", STRING = "string", DATE = "date", DECIMAL = "decimal";
        }
    }

    class ConditionSymbol_zhCN
    {
        public String _eq { get { return "等于"; } }

        public String _lt { get { return "小于"; } }

        public String _lteq { get { return "小于等于"; } }

        public String _gt { get { return "大于"; } }

        public String _gteq { get { return "大于等于"; } }

        public String _noteq { get { return "不等于"; } }

        public String _like { get { return "包含"; } }

        public String _in { get { return "在...中"; } }

        public String _between { get { return "在..间"; } }
    }

}